/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.aurelius.testngexecutionlogger.jmx;

import java.lang.management.ManagementFactory;
import javax.management.*;

/**
 *
 * @author Lukasz
 */
public class NeverendingApp {

    public static void main(String[] args) throws InterruptedException, MalformedObjectNameException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException {

        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        ObjectName name = new ObjectName("org.aurelius.testngexecutionlogger.jmx:type=Hello");
        Hello mbean = new Hello();
        mbs.registerMBean(mbean, name);


        System.out.println("Waiting forever...");
        Thread.sleep(Long.MAX_VALUE);
    }
}
